<?php
namespace app\admin\model;

use think\Model;

class ShippingRule extends Model
{
    protected $name = 'shipping_rule';
    
    // 获取地区ID数组
    public function getRegionIdsArrAttr($value, $data)
    {
        return explode(',', $data['region_ids']);
    }
    
    // 获取地区名称数组
    public function getRegionNamesArrAttr($value, $data)
    {
        return explode(',', $data['region_names']);
    }
}